﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using System.Collections.ObjectModel;
using VLUSM_BusinessLogic.DataTransferObjects;

namespace VLUSM_Service
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "ISystemService" in both code and config file together.
    [ServiceContract]
    public interface ISystemService
    {
        [OperationContract]
        ObservableCollection<DonViDTO> GetDonViList();
        #region User Methods
        [OperationContract]
        ObservableCollection<UserDTO> GetUserList();
        [OperationContract]
        ObservableCollection<UserDTO> GetUserByDonViID(int DonViIDFilter);
        [OperationContract]
        UserDTO GetUserByID(int IDFilter);
        [OperationContract]
        UserDTO GetUserByTenTaiKhoan(string TenTaiKhoanFilter);
        [OperationContract]
        void SaveUser(UserDTO objdto);
        [OperationContract]
        void SaveUserWithDonViList(UserDTO objdto, ObservableCollection<DonViDTO> listdto);
        [OperationContract]
        void SaveDonViWithQuyenList(DonViDTO objdto, ObservableCollection<QuyenDTO> listdto);
        [OperationContract]
        ObservableCollection<DonViDTO> GetDonViNotYetByUserID(int UserID);
        [OperationContract]
        ObservableCollection<DonViDTO> GetDonViByUserID(int UserID);
        [OperationContract]
        void SetDonViListForUser(int UserID, ObservableCollection<DonViDTO> listDTO);
        [OperationContract]
        void UnSetDonViListForUser(int UserID, ObservableCollection<DonViDTO> listDTO);
        [OperationContract]
        void RemoveUser(UserDTO objdto);
        [OperationContract]
        void RemoveUserByID(int IDFilter);
        [OperationContract]
        void AssignUserToDonVi(int UserID, int DonViID);
        [OperationContract]
        void AssignUserListToDonVi(ObservableCollection<UserDTO> dtoList, int DonViID);

        #endregion

        #region Quyen Methods
        [OperationContract]
        ObservableCollection<QuyenDTO> GetQuyenList();
        [OperationContract]
        ObservableCollection<QuyenDTO> GetQuyenByDonViID(int DonViIDFilter);
        [OperationContract]
        ObservableCollection<QuyenDTO> GetQuyenNotYetByDonViID(int DonViIDFilter);
        [OperationContract]
        void SetQuyenForDonVi(int DonViID, int QuyenID);
        [OperationContract]
        void SetQuyenListForDonVi(int DonViID, ObservableCollection<QuyenDTO> listDTO);
        [OperationContract]
        void UnSetQuyenListForDonVi(int DonViID, ObservableCollection<QuyenDTO> listDTO);

        #endregion
    }
}
